<?php
    require "DB.Class.php";
    function Select()
    {
        $con = Connect("debate");
        $Array = array();
        if($con){
            $lv = $_COOKIE['lv'];
            $sql = "SELECT * FROM activity;";
            $res = mysqli_query($con, $sql);
            if(mysqli_num_rows($res) > 0){
                $i = 0;
                while ($row = mysqli_fetch_assoc($res)){
                    $Array[$i] = $row;
                    $i++;
                }
            }
            if($lv == 0){
                array_splice($Array, 0, 1);
            }
        }
        return $Array;
    }
?>